package com.xjgc.eip.twice.zxjeip2chgq.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xjgc.eip.twice.zxjeip2chgq.entity.ZxjEip2cHgq;
import com.xjgc.eip.twice.zxjeip2chgq.mapper.ZxjEip2cHgqMapper;
import com.xjgc.eip.twice.zxjeip2chgq.service.ZxjEip2cHgqService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.common.api.vo.Result;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhanghongbin
 * @since 2019-11-23
 */
@Service
@DS("proxyDs")
public class ZxjEip2cHgqServiceImpl extends ServiceImpl<ZxjEip2cHgqMapper, ZxjEip2cHgq> implements ZxjEip2cHgqService {
    @Override
    public Result<IPage<ZxjEip2cHgq>> queryPageList(ZxjEip2cHgq Hgq, Integer pageNo, Integer pageSize, HttpServletRequest req) {
        Result<IPage<ZxjEip2cHgq>> result = new Result<IPage<ZxjEip2cHgq>>();
        QueryWrapper<ZxjEip2cHgq> queryWrapper = new QueryWrapper<>();
        queryWrapper.setEntity(Hgq);
        Page<ZxjEip2cHgq> page = new Page<ZxjEip2cHgq>(pageNo, pageSize);
        IPage<ZxjEip2cHgq> pageList = super.page(page, queryWrapper);
        result.setSuccess(true);
        result.setResult(pageList);
        return result;
    }
}
